package org.egdp.jclpvm.core.context;

public class ProcessorUnit {

	public static final int PUNIT_CPU = 0;
	public static final int PUNIT_GPU = 1;
	public static final int PUNIT_DSP = 2;
	public static final int PUNIT_NA = -1;
	
	private int unitType = PUNIT_NA;

	public ProcessorUnit(int unitType) {
		super();
		this.unitType = unitType;
	}

	/**
	 * @return the unitType
	 */
	public int getUnitType() {
		return unitType;
	}

	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		String readableUnit = "N/A";
		switch (unitType){
			case PUNIT_CPU: readableUnit = "CPU"; break;
			case PUNIT_GPU: readableUnit = "GPU"; break;
			case PUNIT_DSP: readableUnit = "DSP"; break;
			case PUNIT_NA: readableUnit = "N/A"; break;
		}
		return "Processor Unit Type [" + readableUnit + "]";
	}

}
